Expression Wizard - Select Function

The Function button allows you to choose from a variety of functions to build your expressions. Function categories include:

Navigating to a specific function is easy. Narrow down your results by selecting a particular category. If you do not know what category the function is in, select "All" and scroll through the functions. The functions are listed in alphabetical order.

Expression Wizard - Select Function

This image shows the Expression Wizard dialog which contains a list of all Expressions available for creating Banded Reports.


Date & time Functions

Function Description Returns
CALCDATE(DT,D,M,Y): Adds D days, M months and Y years to a given date DT.
Ex: CALCDATE(ArgosData.Your_Date, 2, 4, 6)
Date
CALCTIME(T,H,M,S): Adds H hours, M minutes and S seconds to a given time T.
Ex: CALCTIME(ArgosData.Your_Time, 2, 4, 6)
String
DATE: Returns current date when report is executed. String
DAYOFWEEK(D): Returns the day of the week (1 - 7) for a given date.
Ex: DAYOFWEEK(ArgosData.Your_Date)
Integer
DAYSTRING(D): Returns the day name for the given day (1=Sunday,2=). Often used with DAYOFWEEK.
Ex: DAYSTRING(1) or DAYSTRING(DAYOFWEEK(ArgosData.Your_Date))
String
EXTRACTDAY(Date): Returns the day of the month (1 - 31) from a given date.
Ex: EXTRACTDAY(ArgosData.Your_Date)
Integer
EXTRACTHOUR(<TIME>) Returns the hour from a given time. Integer
EXTRACTMINUTE(<TIME>) Returns the minute from a given time. Integer
EXTRACTMONTH(Date): Returns the month from a given date.
Ex: EXTRACTMONTH(ArgosData.Your_Date)
Integer
EXTRACTSECOND(<TIME>) Returns the second from a given time. Integer
EXTRACTYEAR(Date): Returns the year from a given date.
Ex: EXTRACTYEAR(ArgosData.Your_Date)
Integer
FORMATDATE(<DATE,<FMT>)

Converts a date to a string.

  • Use hh to print a leading 0 for the hour or h to omit leading zeroes.
  • Leave off the timestamp (or any part of the timestamp) to omit.
  • Add ampm to include the AM/PM indicator.
  • Remember to include single quotes around the format string, and around the date if using a literal date value ('12/8/2014').

Ex: FORMATDATE(NOW,'mm/dd/yyyy h:mm:ss ampm'); Result is 12/08/2014 3:22:40 PM

String
INCDAY(<DATE>,<AMT>) Increments the date parameter by the specified number of days. Date
INCHOUR(<TIME>,<AMT>) Increments the time parameter by the specified number of hours. Date
INCMINUTE(<TIME>,<AMT>) Increments the time parameter by the specified number of minutes. Date
INCMONTH(<DATE>,<AMT>) Increments the date parameter by the specified number of months. Date
INCSECOND(<TIME>,<AMT>) Increments the time parameter by the specified number of seconds. Date
INCYEAR(<DATE>,<AMT>) Increments the date parameter by the specified number of years. Date
MONTHSTRING(M): Returns the month name for the given month M (1..12). Often used with EXTRACTMONTH.
Ex: MONTHSTRING(1) or MONTHSTRING(EXTRACTMONTH (ArgosData.Your_Date))
String
NOW Returns the current date and time. Date
PRINTDATE: Returns the date when report is executed. String
TIME: Returns the current system time as a string. String
WEEKOFYEAR(<DATE>) Returns week number (1-52) from given a date.
Ex: WEEKOFYEAR(ArgosData.Your_Date)
Integer


Math & trig Functions

Function Description Returns
ABS(X): Returns the absolute value of X.
Ex: ABS(ArgosData.Some_Number)
Float
DIV(X,Y): Returns X divided by Y, without the remainder.
Ex: DIV(ArgosData.Some_Number, ArgosData.Some_Other_Number)
Integer
FRAC(X): Returns the fractional part of X.
Ex: FRAC(ArgosData.Some_Number)
Float
INT(X): Returns the integer part of X.
Ex: INT(ArgosData.Some_Number)
Integer
POWER(<X>,<Y>) Returns the first argument raised to the power of the second. Float
ROUND(X,Y) Rounds X to the specified number of digits. Y is the number of digits to which you want to round the number. If Y is greater than zero, the number is rounded to the specified number of decimal places. If Y is zero, the number is rounded to the nearest integer. If Y is less than zero, the number is rounded to the left of the decimal point.
Ex: ROUND(ArgosData.Some_Number,2)
Float
SQRT(X): Returns the square-root of X.
Ex: SQRT(ArgosData.Some_Number)
Float


Statistical Functions

Function Description Returns
AVERAGE(X): Returns the average of X. In a detail band, this function will return the average of the numbers up to the current detail record. In a summary band, it will return the average of all of records.
Ex: AVERAGE(ArgosData.Some_Number)
Float
COUNT: Returns the current increment for each iteration. Integer
MAX(X): Returns the highest X. In a detail band, MAX will return the highest X up to the current record. In a summary band, MAX will return the highest X from all the records.
Ex: MAX(ArgosData.Some_Number)
Float
MIN(X): Returns the lowest X. In a detail band, MIN will return the lowest X up to the current record. In a summary band, MIN will return the lowest X from all the records.
Ex: MIN(ArgosData.Some_Number)
Float
SUM(X): Returns the summation of X. In a detail band, it will return the sum of X up to the current record. In a summary band, SUM will return the sum of all records.
Ex: SUM(ArgosData.Some_Number)
Float


Database Functions

Function Description Returns
COLUMNO: Returns the current column number. Integer
DETAILCOUNT: Returns the number of detail records. Detail Count is the total number of records printed or displayed in your detail band in your report. The number will always be the same no matter what band you place it in. They are counted before they are printed. Integer
DETAILNO: Returns the current detail record number. Detail Number is a cumulative count of all the records printed or displayed in your detail band. If you put Detail Number in your report summary band, it will be the same as Detail Count. If you put it in a page footer band it will be the total number of records printed so far. Integer
EOF(TABLE): Returns TRUE if there are no more records in the dataset. Returns FALSE otherwise. The last detail band will show FALSE because the cursor has not moved past the last record.
Ex: EOF('ArgosData')
Boolean
FIELDLEN(TABLE, FIELD): Returns the length of datafield.
Ex: FIELDLEN('ArgosData','DataFieldName')
Integer
ISEMPTY(TABLE, FIELD): Returns TRUE if field contains an empty string. FALSE if field contains data.
Ex: ISEMPTY('ArgosData',' DataFieldName ')
Boolean
ISNULL(TABLE, FIELD): Returns TRUE if field is null. FALSE if field is not null.
Ex: ISNULL('ArgosData',' DataFieldName ')
Boolean
MEMOLINE(TABLE, FIELD, LINENO) Returns a single line (1..n) from a memo field.
Ex: MEMOLINE('CustTable','Info',1)
String
RECORDCOUNT(<DS>) Returns a dataset's record count. Integer


Logical Functions

Function Description Returns
FALSE: Returns Boolean FALSE. Boolean
IF(Exp, X, Y): Returns X if expression Exp is TRUE. Returns Y otherwise. You can use database fields, other functions or plain text as your values for X and Y. IF statements can also be nested within other IF statements.
Ex: IF(DataField1 = 23, DataField2, Print this text)
Expression
TRUE: Returns Boolean TRUE. Boolean


Informational Functions

Function Description Returns
TYPEOF(Exp): Returns the data type of expression Exp.
Ex: TYPEOF('Expression2') where 'Expression2' is a name of an expression field.
String


Other Functions

Function Description Returns
CHR(I): Converts the ordinal ASCII value to a character.
Ex: CHR (ArgosData.DataField)
String
COPY (X, St, Len): Returns the substring of string X at start position St of length Len. Like SUBSTR in oracle.
Ex: COPY (ArgosData.DataField, 1, 30)
String
COUNTER: Returns the current count. Increments each time it is printed. Integer
CURRENCY: Returns Windows default currency. String
DATEDIFF (D1, D2): Returns the difference of days from date D1 to date D2.
Ex: DATEDIFF (ArgosData.Your_Date1, ArgosData.Your_Date2)
Float
ELEMENTEXISTS (Name): Returns TRUE if an element exists in the report.
Ex: ELEMENTEXISTS ('band2') where 'band2' is a name of a band in the report.
Boolean
FORMATNUMERIC (F, N): Returns number N formatted in format F.
Ex: FORMATNUMERIC ('$###,###.##', ArgosData. Your_Numeric_DataField) formats the number 12345.678 to '$12,345.68'
String
GETEXPR(<exprname>) Retrieves the value of the expression. Depends on expression
GETVARIABLE(<X>) Retrieve the value of an Argos variable. Depends on variable
INSERTSTR (Source,Insert): Inserts string Insert into string Source at position specified by '%s'.
Ex: INSERTSTR ('%s World', 'Hello') will return 'Hello World'.
String
LEFTSTR (STR, LEN): Returns the left LEN number of characters of string STR.
Ex: LEFTSTR ('Hello World', 4) will print 'Hell'.
String
LOWER (X): Returns string X in lowercase letters.
Ex: LOWER (ArgosData. Datafield)
String
NEWPAGE: Forces a page feed. N/A
PADLEFT (S, Len): Returns string S padded to the left with spaces to make S Len characters long.
Ex: PADLEFT (ArgosData. DataField,10)
String
PADLEFTZERO (S, Len): Returns string S padded to the left with '0' to make string S Len characters long
Ex: PADLEFTZERO (ArgosData. DataField,10)
String
PADRIGHT (S, Len): Returns string S padded to the right with spaces to make S Len characters long.
Ex: PADRIGHT (ArgosData. DataField,10)
String
PAGECOUNT: Returns the total number of pages printed in the report. Integer
PAGENUMBER: Returns the current page number in the report. Integer
PIXELS (X): Converts the number X into pixels.
Ex: PIXELS (5) or PIXELS (ArgosData. Your_Numeric_DataField)
Integer
PRETTY (X): Capitalizes the first character of string X.
Ex: PRETTY (ArgosData. Datafield)
String
PROPEXISTS(<element>, <Property>) Checks if property exists for a given report element. Boolean
RESETEXPR (exprname): Resets aggregated expression exprname. Note: Due to the nature of this function, it cannot be placed as an argument within the IF function.
Ex: RESETEXPR (Expression2).
To view a detailed example of how to use this function, see Reset counter example
N/A
RGBCOLOR (RED, GREEN, BLUE): Converts RGB color values to a decimal color value. For use with functions SETCOLOR and SETFONTCOLOR.
Ex: RGBCOLOR (01,31,71)
Integer
RIGHTSTR (STR, LEN): Returns the LEN rightmost characters of string STR.
Ex: RIGHTSTR (ArgosData.DataField, 3)
String
SETCOLOR (Element,Color): Sets a band's background color. Use function RGBCOLOR to get Color. Right click expression and uncheck 'Enabled' to not print the Boolean value.
Ex: SETCOLOR ('Band2', RGBCOLOR (12,13,99))
Boolean
SETFONT (Element, Fontname): Sets a report element's font. TRUE will be returned if the function executes properly. Right click expression and uncheck 'Enabled' to not print the Boolean value. Does not work for band elements.
Ex: SETFONT (Reportlabel2, Arial)
Boolean
SETFONTCOLOR (Element, Color): Sets a report element's font color. Use function RGBCOLOR to get Color. TRUE will be returned if the function executes properly. Right click expression and uncheck 'Enabled' to not print the Boolean value. Does not work for band elements.
Ex: SETFONTCOLOR ('txtLable1', RGBCOLOR(04,04,03))
Boolean
SETFONTSIZE (Element, Size): Sets a report element's font size. TRUE will be returned if the function executes properly. Right click expression and uncheck 'Enabled' to not print the Boolean value. Does not work for band elements.
Ex: SETFONT (Reportlabel2, 18)
Boolean
SETFONTSTYLE (Element, Bold, Italic, Underl, Strike): Sets a report element's font style. TRUE will be returned if the function executes properly. Right click expression and uncheck 'Enabled' to not print the Boolean value. Does not work for band elements.
Ex: SETFONTSTYLE ('ReportLabel2', TRUE, FALSE, TRUE, TRUE)
Boolean
STR(X): Converts number X to string data type.
Ex: STR (ArgosData. Your_Numeric_Datafield)
String
STRETCHSR (S,L): Inserts L spaces between each character of string S. Used to "stretch" a string.
Ex: STRETCHSTR (ArgosData. DataField, 6)
String
STRLEN (S): Returns the length of string S.
Ex: STRLEN (ArgosData. Datafield)
Integer
STRTOINT (X): Converts a valid integer string to integer data type.
Ex: STRTOINT (ArgosData. DataField)
Integer
STRTONUM (X): Converts a valid number string to a number data type.
Ex: STRTONUM (ArgosData. DataField)
Float
TRIM(S): Returns string S without leading and trailing spaces.
Ex: TRIM (ArgosData. DataField)
String
UPPER (X): Returns string X in uppercase letters.
Ex: UPPER (ArgosData. DataField)
String

 

 

See also: Getting Started with Banded Reports